<template>
        <div>
            <p>用户名：<input type="text" v-model="username"></p>
            <p>密  码：<input type="text" v-model="password"></p>
            <p>手机号：<input type="text" v-model="phone"></p>
            <p><button @click="binduser()">提交</button></p>

        </div>
</template>

<script>
import axios from "axios";
export default {
    name:"simuser",
    data() {
        return {
            username:"",
            password:"",
            phone:""
        }
    },
    methods:{
        binduser(){
            var formddta = new FormData()
            formdata.append("username",this.username)
            formdata.append("password",this.password)
            formdata.append("phone",this.phone)
            formdata.append("uid",sessionStorage.getItem("u_id"))
            axios({
                url:"http://127.0.0.1:8000/users/binduser/",
                method:"post",
                data:formdata
            }).then(res=>{
                console.log(res.data)
            })
        }
    }
}

</script>

<style>

</style>
